package com.cc8w.home.mapper;


import com.cc8w.entity.CategoryEntity;
import com.cc8w.entity.GoodsAttrEntity;
import com.cc8w.entity.GoodsEntity;
import com.cc8w.entity.ModelsEntity;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.math.BigDecimal;
import java.util.List;

@Repository("goodsMapper")
public interface GoodsMapper {
    //获得产品分类
    List<CategoryEntity> getGoodsCat();
    //获得模型分类
    List<ModelsEntity> getModels();
    //获得产品
    List<GoodsEntity> getGoods();
    //获得优惠打折产品
    List<GoodsEntity> getDiscountGoods();
    //获得某分类产品
    List<GoodsEntity> getGoodsListByCatId(@Param("catId") int catId);
    //获得产品详情
    GoodsEntity getGoodsDetails(@Param("goods_id") int goodsId);

    List<GoodsAttrEntity> getGoodsAttr(@Param("goods_id") int goodsId);

    //获得产品价格
    BigDecimal getGoodsPrice(@Param("goods_id") int goodsId, @Param("goods_sn") String goodsSn);


}
